package com.lzx.adx.report.enums;

/**
 * 创智小米和wifi映射关系
 */
public enum CZCovertXMWifiEventTypeEnums {
    ACTIVE_APP("active","APP_ACTIVE", "1"),
    LOGIN_APP("login","APP_RETENTION", "5"),
    REGISTER_APP("register","APP_REGISTER", "2"),
    ;


    CZCovertXMWifiEventTypeEnums(String pCode, String xmCode, String wifiCode) {
        this.pCode = pCode;
        this.xmCode = xmCode;
        this.wifiCode = wifiCode;
    }

    public String getpCode() {
        return pCode;
    }

    public void setpCode(String pCode) {
        this.pCode = pCode;
    }

    public String getXmCode() {
        return xmCode;
    }

    public void setXmCode(String xmCode) {
        this.xmCode = xmCode;
    }

    public String getWifiCode() {
        return wifiCode;
    }

    public void setWifiCode(String wifiCode) {
        this.wifiCode = wifiCode;
    }

    private String pCode;

    private String xmCode;

    private String wifiCode;


    public static String getXiaoMiCode(String pCode) {
        for (CZCovertXMWifiEventTypeEnums value : CZCovertXMWifiEventTypeEnums.values()) {
            if (value.pCode.equals(pCode)) {
                return value.xmCode;
            }
        }
        return null;
    }

    public static String getWifiCode(String pCode) {
        for (CZCovertXMWifiEventTypeEnums value : CZCovertXMWifiEventTypeEnums.values()) {
            if (value.pCode.equals(pCode)) {
                return value.wifiCode;
            }
        }
        return null;
    }


}
